// 本地存储封装
const Storage = {
  set(key, value) {
    wx.setStorageSync(key, value);
  },
  get(key, def = null) {
    try {
      return wx.getStorageSync(key) || def;
    } catch (e) {
      return def;
    }
  },
  remove(key) {
    wx.removeStorageSync(key);
  }
};
module.exports = Storage;
